#ifndef KMYBUTTON_H
#define KMYBUTTON_H

#include "KmyNode.h"
#include "KmySprite.h"

class KmyButton : public KmySprite
{
public:
    KmyButton();

    KmyButton(KmySpriteTemplate* sptt,
              int normal_anime_index,
              int select_anime_index,
              int down_anime_index,
              int disable_anime_index);

    ~KmyButton();

    int value;

    static const int BUTTON_STATE_NORMAL    = 0;
    static const int BUTTON_STATE_SELECT    = 1;
    static const int BUTTON_STATE_DOWN      = 2;
    static const int BUTTON_STATE_DISABLE   = 3;
    // 按钮状态
    int state;

    int normal_anime_index;
    int select_anime_index;
    int down_anime_index;
    int disable_anime_index;

//    St_Rect* srect;
//    St_Rect* drect;

//    // 普通
//    int normal_frame_num;
//    St_Rect** normal_srects;
//    St_Rect** normal_drects;
//    // 选中
//    int selected_frame_num;
//    St_Rect** selected_srects;
//    St_Rect** selected_drects;
//    // 按下
//    int down_frame_num;
//    St_Rect** down_srects;
//    St_Rect** down_drects;
//    // 不可用
//    int disable_frame_num;
//    St_Rect** disable_srects;
//    St_Rect** disable_drects;

//    void logic();

//    void render(KmyICanvas *screen);
};

#endif // KMYBUTTON_H
